<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# LANGUAGE BangPatterns, ScopedTypeVariables #-}</span><span>
</span><span id="line-2"></span><span>
</span><span id="line-3"></span><span class="hs-comment">-- |</span><span>
</span><span id="line-4"></span><span class="hs-comment">-- Module      : Data.Text.Lazy.Search</span><span>
</span><span id="line-5"></span><span class="hs-comment">-- Copyright   : (c) 2009, 2010 Bryan O'Sullivan</span><span>
</span><span id="line-6"></span><span class="hs-comment">--</span><span>
</span><span id="line-7"></span><span class="hs-comment">-- License     : BSD-style</span><span>
</span><span id="line-8"></span><span class="hs-comment">-- Maintainer  : bos@serpentine.com</span><span>
</span><span id="line-9"></span><span class="hs-comment">-- Stability   : experimental</span><span>
</span><span id="line-10"></span><span class="hs-comment">-- Portability : GHC</span><span>
</span><span id="line-11"></span><span class="hs-comment">--</span><span>
</span><span id="line-12"></span><span class="hs-comment">-- /Warning/: this is an internal module, and does not have a stable</span><span>
</span><span id="line-13"></span><span class="hs-comment">-- API or name. Functions in this module may not check or enforce</span><span>
</span><span id="line-14"></span><span class="hs-comment">-- preconditions expected by public modules. Use at your own risk!</span><span>
</span><span id="line-15"></span><span class="hs-comment">--</span><span>
</span><span id="line-16"></span><span class="hs-comment">-- Fast substring search for lazy 'Text', based on work by Boyer,</span><span>
</span><span id="line-17"></span><span class="hs-comment">-- Moore, Horspool, Sunday, and Lundh.  Adapted from the strict</span><span>
</span><span id="line-18"></span><span class="hs-comment">-- implementation.</span><span>
</span><span id="line-19"></span><span>
</span><span id="line-20"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">Data.Text.Internal.Lazy.Search</span><span>
</span><span id="line-21"></span><span>    </span><span class="hs-special">(</span><span>
</span><span id="line-22"></span><span>      </span><span class="annot"><a href="Data.Text.Internal.Lazy.Search.html#indices"><span class="hs-identifier">indices</span></a></span><span>
</span><span id="line-23"></span><span>    </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-24"></span><span>
</span><span id="line-25"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="Data.Text.Array.html"><span class="hs-identifier">Data.Text.Array</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">A</span></span><span>
</span><span id="line-26"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Int.html#"><span class="hs-identifier">Data.Int</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Int.html#Int64"><span class="hs-identifier">Int64</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-27"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Word.html#"><span class="hs-identifier">Data.Word</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Word.html#Word16"><span class="hs-identifier">Word16</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word64"><span class="hs-identifier">Word64</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-28"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="Data.Text.Internal.html"><span class="hs-identifier">Data.Text.Internal</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">T</span></span><span>
</span><span id="line-29"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html"><span class="hs-identifier">Data.Text.Internal.Fusion.Types</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#PairS"><span class="hs-identifier">PairS</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-30"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Data.Text.Internal.Lazy.html"><span class="hs-identifier">Data.Text.Internal.Lazy</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Lazy.html#Text"><span class="hs-identifier">Text</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Lazy.html#foldlChunks"><span class="hs-identifier">foldlChunks</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-31"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Bits.html#"><span class="hs-identifier">Data.Bits</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Data.Bits.html#.%7C."><span class="hs-operator">(.|.)</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/Data.Bits.html#.%26."><span class="hs-operator">(.&amp;.)</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-32"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Data.Text.Internal.Unsafe.Shift.html"><span class="hs-identifier">Data.Text.Internal.Unsafe.Shift</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Unsafe.Shift.html#shiftL"><span class="hs-identifier">shiftL</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-33"></span><span>
</span><span id="line-34"></span><span class="hs-comment">-- | /O(n+m)/ Find the offsets of all non-overlapping indices of</span><span>
</span><span id="line-35"></span><span class="hs-comment">-- @needle@ within @haystack@.</span><span>
</span><span id="line-36"></span><span class="hs-comment">--</span><span>
</span><span id="line-37"></span><span class="hs-comment">-- This function is strict in @needle@, and lazy (as far as possible)</span><span>
</span><span id="line-38"></span><span class="hs-comment">-- in the chunks of @haystack@.</span><span>
</span><span id="line-39"></span><span class="hs-comment">--</span><span>
</span><span id="line-40"></span><span class="hs-comment">-- In (unlikely) bad cases, this algorithm's complexity degrades</span><span>
</span><span id="line-41"></span><span class="hs-comment">-- towards /O(n*m)/.</span><span>
</span><span id="line-42"></span><span class="annot"><a href="Data.Text.Internal.Lazy.Search.html#indices"><span class="hs-identifier hs-type">indices</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.Text.Internal.Lazy.html#Text"><span class="hs-identifier hs-type">Text</span></a></span><span>              </span><span class="hs-comment">-- ^ Substring to search for (@needle@)</span><span>
</span><span id="line-43"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Lazy.html#Text"><span class="hs-identifier hs-type">Text</span></a></span><span>              </span><span class="hs-comment">-- ^ Text to search in (@haystack@)</span><span>
</span><span id="line-44"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Int.html#Int64"><span class="hs-identifier hs-type">Int64</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-45"></span><span id="indices"><span class="annot"><span class="annottext">indices :: Text -&gt; Text -&gt; [Int64]
</span><a href="Data.Text.Internal.Lazy.Search.html#indices"><span class="hs-identifier hs-var hs-var">indices</span></a></span></span><span> </span><span id="local-6989586621679111901"><span class="annot"><span class="annottext">needle :: Text
</span><a href="#local-6989586621679111901"><span class="hs-identifier hs-var">needle</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Lazy.html#Chunk"><span class="hs-identifier hs-type">Chunk</span></a></span><span> </span><span id="local-6989586621679111899"><span class="annot"><span class="annottext">Text
</span><a href="#local-6989586621679111899"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span id="local-6989586621679111898"><span class="annot"><span class="annottext">Text
</span><a href="#local-6989586621679111898"><span class="hs-identifier hs-var">ns</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679111897"><span class="annot"><span class="annottext">_haystack :: Text
</span><a href="#local-6989586621679111897"><span class="hs-identifier hs-var">_haystack</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Lazy.html#Chunk"><span class="hs-identifier hs-type">Chunk</span></a></span><span> </span><span id="local-6989586621679111896"><span class="annot"><span class="annottext">Text
</span><a href="#local-6989586621679111896"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span id="local-6989586621679111895"><span class="annot"><span class="annottext">Text
</span><a href="#local-6989586621679111895"><span class="hs-identifier hs-var">ks</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-46"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int64
</span><a href="#local-6989586621679111894"><span class="hs-identifier hs-var">nlen</span></a></span><span> </span><span class="annot"><span class="annottext">Int64 -&gt; Int64 -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C%3D"><span class="hs-operator hs-var">&lt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Int64
</span><span class="hs-number">0</span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-47"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int64
</span><a href="#local-6989586621679111894"><span class="hs-identifier hs-var">nlen</span></a></span><span> </span><span class="annot"><span class="annottext">Int64 -&gt; Int64 -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">Int64
</span><span class="hs-number">1</span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word16 -&gt; Int64 -&gt; Text -&gt; Text -&gt; [Int64]
</span><a href="Data.Text.Internal.Lazy.Search.html#indicesOne"><span class="hs-identifier hs-var">indicesOne</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int64 -&gt; Word16
</span><a href="#local-6989586621679111891"><span class="hs-identifier hs-var">nindex</span></a></span><span> </span><span class="annot"><span class="annottext">Int64
</span><span class="hs-number">0</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int64
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">Text
</span><a href="#local-6989586621679111896"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Text
</span><a href="#local-6989586621679111895"><span class="hs-identifier hs-var">ks</span></a></span><span>
</span><span id="line-48"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Text -&gt; Text -&gt; Int64 -&gt; Int64 -&gt; [Int64]
</span><a href="#local-6989586621679111890"><span class="hs-identifier hs-var">advance</span></a></span><span> </span><span class="annot"><span class="annottext">Text
</span><a href="#local-6989586621679111896"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Text
</span><a href="#local-6989586621679111895"><span class="hs-identifier hs-var">ks</span></a></span><span> </span><span class="annot"><span class="annottext">Int64
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">Int64
</span><span class="hs-number">0</span></span><span>
</span><span id="line-49"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-50"></span><span>    </span><span id="local-6989586621679111890"><span class="annot"><span class="annottext">advance :: Text -&gt; Text -&gt; Int64 -&gt; Int64 -&gt; [Int64]
</span><a href="#local-6989586621679111890"><span class="hs-identifier hs-var hs-var">advance</span></a></span></span><span> </span><span id="local-6989586621679111889"><span class="annot"><span class="annottext">x :: Text
</span><a href="#local-6989586621679111889"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.html#Text"><span class="hs-identifier hs-type">T.Text</span></a></span><span> </span><span class="annot"><span class="annottext">Array
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679111887"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679111887"><span class="hs-identifier hs-var">l</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679111886"><span class="annot"><span class="annottext">Text
</span><a href="#local-6989586621679111886"><span class="hs-identifier hs-var">xs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int64 -&gt; Int64 -&gt; [Int64]
</span><a href="#local-6989586621679111885"><span class="hs-identifier hs-var">scan</span></a></span><span>
</span><span id="line-51"></span><span>     </span><span class="hs-keyword">where</span><span>
</span><span id="line-52"></span><span>      </span><span id="local-6989586621679111885"><span class="annot"><span class="annottext">scan :: Int64 -&gt; Int64 -&gt; [Int64]
</span><a href="#local-6989586621679111885"><span class="hs-identifier hs-var hs-var">scan</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679111874"><span class="annot"><span class="annottext">Int64
</span><a href="#local-6989586621679111874"><span class="hs-identifier hs-var">g</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679111873"><span class="annot"><span class="annottext">Int64
</span><a href="#local-6989586621679111873"><span class="hs-identifier hs-var">i</span></a></span></span><span>
</span><span id="line-53"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int64
</span><a href="#local-6989586621679111873"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Int64 -&gt; Int64 -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3E%3D"><span class="hs-operator hs-var">&gt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Int64
</span><a href="#local-6989586621679111872"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Text
</span><a href="#local-6989586621679111886"><span class="hs-identifier hs-var">xs</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-54"></span><span>                      </span><span class="annot"><span class="annottext">Text
</span><a href="Data.Text.Internal.Lazy.html#Empty"><span class="hs-identifier hs-var">Empty</span></a></span><span>           </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-55"></span><span>                      </span><span class="annot"><a href="Data.Text.Internal.Lazy.html#Chunk"><span class="hs-identifier hs-type">Chunk</span></a></span><span> </span><span id="local-6989586621679111870"><span class="annot"><span class="annottext">Text
</span><a href="#local-6989586621679111870"><span class="hs-identifier hs-var">y</span></a></span></span><span> </span><span id="local-6989586621679111869"><span class="annot"><span class="annottext">Text
</span><a href="#local-6989586621679111869"><span class="hs-identifier hs-var">ys</span></a></span></span><span>      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Text -&gt; Text -&gt; Int64 -&gt; Int64 -&gt; [Int64]
</span><a href="#local-6989586621679111890"><span class="hs-identifier hs-var">advance</span></a></span><span> </span><span class="annot"><span class="annottext">Text
</span><a href="#local-6989586621679111870"><span class="hs-identifier hs-var">y</span></a></span><span> </span><span class="annot"><span class="annottext">Text
</span><a href="#local-6989586621679111869"><span class="hs-identifier hs-var">ys</span></a></span><span> </span><span class="annot"><span class="annottext">Int64
</span><a href="#local-6989586621679111874"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int64
</span><a href="#local-6989586621679111873"><span class="hs-identifier hs-var">i</span></a></span><span class="annot"><span class="annottext">Int64 -&gt; Int64 -&gt; Int64
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span class="annot"><span class="annottext">Int64
</span><a href="#local-6989586621679111872"><span class="hs-identifier hs-var">m</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-56"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int64 -&gt; Text -&gt; Text -&gt; Bool
</span><a href="#local-6989586621679111868"><span class="hs-identifier hs-var">lackingHay</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int64
</span><a href="#local-6989586621679111873"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Int64 -&gt; Int64 -&gt; Int64
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int64
</span><a href="#local-6989586621679111894"><span class="hs-identifier hs-var">nlen</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Text
</span><a href="#local-6989586621679111889"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Text
</span><a href="#local-6989586621679111886"><span class="hs-identifier hs-var">xs</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-57"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Word16
</span><a href="#local-6989586621679111866"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Word16 -&gt; Word16 -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">Word16
</span><a href="#local-6989586621679111865"><span class="hs-identifier hs-var">z</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%26%26"><span class="hs-operator hs-var">&amp;&amp;</span></a></span><span> </span><span class="annot"><span class="annottext">Int64 -&gt; Bool
</span><a href="#local-6989586621679111863"><span class="hs-identifier hs-var">candidateMatch</span></a></span><span> </span><span class="annot"><span class="annottext">Int64
</span><span class="hs-number">0</span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int64
</span><a href="#local-6989586621679111874"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="annot"><span class="annottext">Int64 -&gt; [Int64] -&gt; [Int64]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span> </span><span class="annot"><span class="annottext">Int64 -&gt; Int64 -&gt; [Int64]
</span><a href="#local-6989586621679111885"><span class="hs-identifier hs-var">scan</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int64
</span><a href="#local-6989586621679111874"><span class="hs-identifier hs-var">g</span></a></span><span class="annot"><span class="annottext">Int64 -&gt; Int64 -&gt; Int64
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int64
</span><a href="#local-6989586621679111894"><span class="hs-identifier hs-var">nlen</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int64
</span><a href="#local-6989586621679111873"><span class="hs-identifier hs-var">i</span></a></span><span class="annot"><span class="annottext">Int64 -&gt; Int64 -&gt; Int64
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int64
</span><a href="#local-6989586621679111894"><span class="hs-identifier hs-var">nlen</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-58"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>                   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int64 -&gt; Int64 -&gt; [Int64]
</span><a href="#local-6989586621679111885"><span class="hs-identifier hs-var">scan</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int64
</span><a href="#local-6989586621679111874"><span class="hs-identifier hs-var">g</span></a></span><span class="annot"><span class="annottext">Int64 -&gt; Int64 -&gt; Int64
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int64
</span><a href="#local-6989586621679111862"><span class="hs-identifier hs-var">delta</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int64
</span><a href="#local-6989586621679111873"><span class="hs-identifier hs-var">i</span></a></span><span class="annot"><span class="annottext">Int64 -&gt; Int64 -&gt; Int64
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int64
</span><a href="#local-6989586621679111862"><span class="hs-identifier hs-var">delta</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-59"></span><span>       </span><span class="hs-keyword">where</span><span>
</span><span id="line-60"></span><span>         </span><span id="local-6989586621679111872"><span class="annot"><span class="annottext">m :: Int64
</span><a href="#local-6989586621679111872"><span class="hs-identifier hs-var hs-var">m</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int64
</span><a href="Data.Text.Internal.Lazy.Search.html#intToInt64"><span class="hs-identifier hs-var">intToInt64</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679111887"><span class="hs-identifier hs-var">l</span></a></span><span>
</span><span id="line-61"></span><span>         </span><span id="local-6989586621679111866"><span class="annot"><span class="annottext">c :: Word16
</span><a href="#local-6989586621679111866"><span class="hs-identifier hs-var hs-var">c</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int64 -&gt; Word16
</span><a href="#local-6989586621679111859"><span class="hs-identifier hs-var">hindex</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int64
</span><a href="#local-6989586621679111873"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Int64 -&gt; Int64 -&gt; Int64
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int64
</span><a href="#local-6989586621679111858"><span class="hs-identifier hs-var">nlast</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-62"></span><span>         </span><span id="local-6989586621679111862"><span class="annot"><span class="annottext">delta :: Int64
</span><a href="#local-6989586621679111862"><span class="hs-identifier hs-var hs-var">delta</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679111851"><span class="hs-identifier hs-var">nextInPattern</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int64
</span><a href="#local-6989586621679111894"><span class="hs-identifier hs-var">nlen</span></a></span><span> </span><span class="annot"><span class="annottext">Int64 -&gt; Int64 -&gt; Int64
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int64
</span><span class="hs-number">1</span></span><span>
</span><span id="line-63"></span><span>               </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Word16
</span><a href="#local-6989586621679111866"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Word16 -&gt; Word16 -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">Word16
</span><a href="#local-6989586621679111865"><span class="hs-identifier hs-var">z</span></a></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int64
</span><a href="#local-6989586621679111850"><span class="hs-identifier hs-var">skip</span></a></span><span> </span><span class="annot"><span class="annottext">Int64 -&gt; Int64 -&gt; Int64
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int64
</span><span class="hs-number">1</span></span><span>
</span><span id="line-64"></span><span>               </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int64
</span><span class="hs-number">1</span></span><span>
</span><span id="line-65"></span><span>         </span><span id="local-6989586621679111851"><span class="annot"><span class="annottext">nextInPattern :: Bool
</span><a href="#local-6989586621679111851"><span class="hs-identifier hs-var hs-var">nextInPattern</span></a></span></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word64
</span><a href="#local-6989586621679111843"><span class="hs-identifier hs-var">mask</span></a></span><span> </span><span class="annot"><span class="annottext">Word64 -&gt; Word64 -&gt; Word64
forall a. Bits a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/Data.Bits.html#.%26."><span class="hs-operator hs-var">.&amp;.</span></a></span><span> </span><span class="annot"><span class="annottext">Word16 -&gt; Word64
</span><a href="#local-6989586621679111842"><span class="hs-identifier hs-var">swizzle</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int64 -&gt; Word16
</span><a href="#local-6989586621679111859"><span class="hs-identifier hs-var">hindex</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int64
</span><a href="#local-6989586621679111873"><span class="hs-identifier hs-var">i</span></a></span><span class="annot"><span class="annottext">Int64 -&gt; Int64 -&gt; Int64
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int64
</span><a href="#local-6989586621679111894"><span class="hs-identifier hs-var">nlen</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word64 -&gt; Word64 -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">Word64
</span><span class="hs-number">0</span></span><span>
</span><span id="line-66"></span><span>         </span><span id="local-6989586621679111863"><span class="annot"><span class="annottext">candidateMatch :: Int64 -&gt; Bool
</span><a href="#local-6989586621679111863"><span class="hs-identifier hs-var hs-var">candidateMatch</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679111836"><span class="annot"><span class="annottext">Int64
</span><a href="#local-6989586621679111836"><span class="hs-identifier hs-var">j</span></a></span></span><span>
</span><span id="line-67"></span><span>             </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int64
</span><a href="#local-6989586621679111836"><span class="hs-identifier hs-var">j</span></a></span><span> </span><span class="annot"><span class="annottext">Int64 -&gt; Int64 -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3E%3D"><span class="hs-operator hs-var">&gt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Int64
</span><a href="#local-6989586621679111858"><span class="hs-identifier hs-var">nlast</span></a></span><span>               </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>
</span><span id="line-68"></span><span>             </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int64 -&gt; Word16
</span><a href="#local-6989586621679111859"><span class="hs-identifier hs-var">hindex</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int64
</span><a href="#local-6989586621679111873"><span class="hs-identifier hs-var">i</span></a></span><span class="annot"><span class="annottext">Int64 -&gt; Int64 -&gt; Int64
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int64
</span><a href="#local-6989586621679111836"><span class="hs-identifier hs-var">j</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word16 -&gt; Word16 -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%2F%3D"><span class="hs-operator hs-var">/=</span></a></span><span> </span><span class="annot"><span class="annottext">Int64 -&gt; Word16
</span><a href="#local-6989586621679111891"><span class="hs-identifier hs-var">nindex</span></a></span><span> </span><span class="annot"><span class="annottext">Int64
</span><a href="#local-6989586621679111836"><span class="hs-identifier hs-var">j</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#False"><span class="hs-identifier hs-var">False</span></a></span><span>
</span><span id="line-69"></span><span>             </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>                </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int64 -&gt; Bool
</span><a href="#local-6989586621679111863"><span class="hs-identifier hs-var">candidateMatch</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int64
</span><a href="#local-6989586621679111836"><span class="hs-identifier hs-var">j</span></a></span><span class="annot"><span class="annottext">Int64 -&gt; Int64 -&gt; Int64
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int64
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span>
</span><span id="line-70"></span><span>         </span><span id="local-6989586621679111859"><span class="annot"><span class="annottext">hindex :: Int64 -&gt; Word16
</span><a href="#local-6989586621679111859"><span class="hs-identifier hs-var hs-var">hindex</span></a></span></span><span>                         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Text -&gt; Text -&gt; Int64 -&gt; Word16
</span><a href="Data.Text.Internal.Lazy.Search.html#index"><span class="hs-identifier hs-var">index</span></a></span><span> </span><span class="annot"><span class="annottext">Text
</span><a href="#local-6989586621679111889"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Text
</span><a href="#local-6989586621679111886"><span class="hs-identifier hs-var">xs</span></a></span><span>
</span><span id="line-71"></span><span>    </span><span id="local-6989586621679111894"><span class="annot"><span class="annottext">nlen :: Int64
</span><a href="#local-6989586621679111894"><span class="hs-identifier hs-var hs-var">nlen</span></a></span></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Text -&gt; Int64
</span><a href="Data.Text.Internal.Lazy.Search.html#wordLength"><span class="hs-identifier hs-var">wordLength</span></a></span><span> </span><span class="annot"><span class="annottext">Text
</span><a href="#local-6989586621679111901"><span class="hs-identifier hs-var">needle</span></a></span><span>
</span><span id="line-72"></span><span>    </span><span id="local-6989586621679111858"><span class="annot"><span class="annottext">nlast :: Int64
</span><a href="#local-6989586621679111858"><span class="hs-identifier hs-var hs-var">nlast</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int64
</span><a href="#local-6989586621679111894"><span class="hs-identifier hs-var">nlen</span></a></span><span> </span><span class="annot"><span class="annottext">Int64 -&gt; Int64 -&gt; Int64
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Int64
</span><span class="hs-number">1</span></span><span>
</span><span id="line-73"></span><span>    </span><span id="local-6989586621679111891"><span class="annot"><span class="annottext">nindex :: Int64 -&gt; Word16
</span><a href="#local-6989586621679111891"><span class="hs-identifier hs-var hs-var">nindex</span></a></span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Text -&gt; Text -&gt; Int64 -&gt; Word16
</span><a href="Data.Text.Internal.Lazy.Search.html#index"><span class="hs-identifier hs-var">index</span></a></span><span> </span><span class="annot"><span class="annottext">Text
</span><a href="#local-6989586621679111899"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Text
</span><a href="#local-6989586621679111898"><span class="hs-identifier hs-var">ns</span></a></span><span>
</span><span id="line-74"></span><span>    </span><span id="local-6989586621679111865"><span class="annot"><span class="annottext">z :: Word16
</span><a href="#local-6989586621679111865"><span class="hs-identifier hs-var hs-var">z</span></a></span></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Word16 -&gt; Text -&gt; Word16) -&gt; Word16 -&gt; Text -&gt; Word16
forall a. (a -&gt; Text -&gt; a) -&gt; a -&gt; Text -&gt; a
</span><a href="Data.Text.Internal.Lazy.html#foldlChunks"><span class="hs-identifier hs-var">foldlChunks</span></a></span><span> </span><span class="annot"><span class="annottext">Word16 -&gt; Text -&gt; Word16
forall {p}. p -&gt; Text -&gt; Word16
</span><a href="#local-6989586621679111829"><span class="hs-identifier hs-var">fin</span></a></span><span> </span><span class="annot"><span class="annottext">Word16
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">Text
</span><a href="#local-6989586621679111901"><span class="hs-identifier hs-var">needle</span></a></span><span>
</span><span id="line-75"></span><span>        </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621679111829"><span class="annot"><span class="annottext">fin :: p -&gt; Text -&gt; Word16
</span><a href="#local-6989586621679111829"><span class="hs-identifier hs-var hs-var">fin</span></a></span></span><span> </span><span class="annot"><span class="annottext">p
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.html#Text"><span class="hs-identifier hs-type">T.Text</span></a></span><span> </span><span id="local-6989586621679111825"><span class="annot"><span class="annottext">Array
</span><a href="#local-6989586621679111825"><span class="hs-identifier hs-var">farr</span></a></span></span><span> </span><span id="local-6989586621679111824"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679111824"><span class="hs-identifier hs-var">foff</span></a></span></span><span> </span><span id="local-6989586621679111823"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679111823"><span class="hs-identifier hs-var">flen</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Array -&gt; Int -&gt; Word16
</span><a href="Data.Text.Array.html#unsafeIndex"><span class="hs-identifier hs-var">A.unsafeIndex</span></a></span><span> </span><span class="annot"><span class="annottext">Array
</span><a href="#local-6989586621679111825"><span class="hs-identifier hs-var">farr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679111824"><span class="hs-identifier hs-var">foff</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679111823"><span class="hs-identifier hs-var">flen</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span>
</span><span id="line-76"></span><span>    </span><span class="hs-special">(</span><span id="local-6989586621679111843"><span class="annot"><span class="annottext">Word64
</span><a href="#local-6989586621679111843"><span class="hs-identifier hs-var">mask</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word64"><span class="hs-identifier hs-type">Word64</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#%3A%2A%3A"><span class="hs-operator hs-type">:*:</span></a></span><span> </span><span id="local-6989586621679111850"><span class="annot"><span class="annottext">Int64
</span><a href="#local-6989586621679111850"><span class="hs-identifier hs-var">skip</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Text
-&gt; Text -&gt; Int64 -&gt; Int -&gt; Word64 -&gt; Int64 -&gt; PairS Word64 Int64
</span><a href="#local-6989586621679111816"><span class="hs-identifier hs-var">buildTable</span></a></span><span> </span><span class="annot"><span class="annottext">Text
</span><a href="#local-6989586621679111899"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Text
</span><a href="#local-6989586621679111898"><span class="hs-identifier hs-var">ns</span></a></span><span> </span><span class="annot"><span class="annottext">Int64
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">Word64
</span><span class="hs-number">0</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int64
</span><a href="#local-6989586621679111894"><span class="hs-identifier hs-var">nlen</span></a></span><span class="annot"><span class="annottext">Int64 -&gt; Int64 -&gt; Int64
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span class="annot"><span class="annottext">Int64
</span><span class="hs-number">2</span></span><span class="hs-special">)</span><span>
</span><span id="line-77"></span><span>
</span><span id="line-78"></span><span>    </span><span class="annot"><a href="#local-6989586621679111842"><span class="hs-identifier hs-type">swizzle</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word16"><span class="hs-identifier hs-type">Word16</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word64"><span class="hs-identifier hs-type">Word64</span></a></span><span>
</span><span id="line-79"></span><span>    </span><span id="local-6989586621679111842"><span class="annot"><span class="annottext">swizzle :: Word16 -&gt; Word64
</span><a href="#local-6989586621679111842"><span class="hs-identifier hs-var hs-var">swizzle</span></a></span></span><span> </span><span id="local-6989586621679111815"><span class="annot"><span class="annottext">Word16
</span><a href="#local-6989586621679111815"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word64
</span><span class="hs-number">1</span></span><span> </span><span class="annot"><span class="annottext">Word64 -&gt; Int -&gt; Word64
forall a. UnsafeShift a =&gt; a -&gt; Int -&gt; a
</span><a href="Data.Text.Internal.Unsafe.Shift.html#shiftL"><span class="hs-operator hs-var">`shiftL`</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word16 -&gt; Int
</span><a href="Data.Text.Internal.Lazy.Search.html#word16ToInt"><span class="hs-identifier hs-var">word16ToInt</span></a></span><span> </span><span class="annot"><span class="annottext">Word16
</span><a href="#local-6989586621679111815"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Bits a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/Data.Bits.html#.%26."><span class="hs-operator hs-var">.&amp;.</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0x3f</span></span><span class="hs-special">)</span><span>
</span><span id="line-80"></span><span>
</span><span id="line-81"></span><span>    </span><span id="local-6989586621679111816"><span class="annot"><span class="annottext">buildTable :: Text
-&gt; Text -&gt; Int64 -&gt; Int -&gt; Word64 -&gt; Int64 -&gt; PairS Word64 Int64
</span><a href="#local-6989586621679111816"><span class="hs-identifier hs-var hs-var">buildTable</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.html#Text"><span class="hs-identifier hs-type">T.Text</span></a></span><span> </span><span id="local-6989586621679111813"><span class="annot"><span class="annottext">Array
</span><a href="#local-6989586621679111813"><span class="hs-identifier hs-var">xarr</span></a></span></span><span> </span><span id="local-6989586621679111812"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679111812"><span class="hs-identifier hs-var">xoff</span></a></span></span><span> </span><span id="local-6989586621679111811"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679111811"><span class="hs-identifier hs-var">xlen</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679111810"><span class="annot"><span class="annottext">Text
</span><a href="#local-6989586621679111810"><span class="hs-identifier hs-var">xs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int64 -&gt; Int -&gt; Word64 -&gt; Int64 -&gt; PairS Word64 Int64
</span><a href="#local-6989586621679111809"><span class="hs-identifier hs-var">go</span></a></span><span>
</span><span id="line-82"></span><span>      </span><span class="hs-keyword">where</span><span>
</span><span id="line-83"></span><span>        </span><span id="local-6989586621679111809"><span class="annot"><span class="annottext">go :: Int64 -&gt; Int -&gt; Word64 -&gt; Int64 -&gt; PairS Word64 Int64
</span><a href="#local-6989586621679111809"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span class="hs-glyph">!</span><span class="hs-special">(</span><span id="local-6989586621679111801"><span class="annot"><span class="annottext">Int64
</span><a href="#local-6989586621679111801"><span class="hs-identifier hs-var">g</span></a></span></span><span class="hs-glyph">::</span><span class="annot"><a href="../../base/src/GHC.Int.html#Int64"><span class="hs-identifier hs-type">Int64</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679111800"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679111800"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679111799"><span class="annot"><span class="annottext">Word64
</span><a href="#local-6989586621679111799"><span class="hs-identifier hs-var">msk</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679111798"><span class="annot"><span class="annottext">Int64
</span><a href="#local-6989586621679111798"><span class="hs-identifier hs-var">skp</span></a></span></span><span>
</span><span id="line-84"></span><span>            </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679111800"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3E%3D"><span class="hs-operator hs-var">&gt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679111797"><span class="hs-identifier hs-var">xlast</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Text
</span><a href="#local-6989586621679111810"><span class="hs-identifier hs-var">xs</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-85"></span><span>                             </span><span class="annot"><span class="annottext">Text
</span><a href="Data.Text.Internal.Lazy.html#Empty"><span class="hs-identifier hs-var">Empty</span></a></span><span>      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word64
</span><a href="#local-6989586621679111799"><span class="hs-identifier hs-var">msk</span></a></span><span> </span><span class="annot"><span class="annottext">Word64 -&gt; Word64 -&gt; Word64
forall a. Bits a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/Data.Bits.html#.%7C."><span class="hs-operator hs-var">.|.</span></a></span><span> </span><span class="annot"><span class="annottext">Word16 -&gt; Word64
</span><a href="#local-6989586621679111842"><span class="hs-identifier hs-var">swizzle</span></a></span><span> </span><span class="annot"><span class="annottext">Word16
</span><a href="#local-6989586621679111865"><span class="hs-identifier hs-var">z</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word64 -&gt; Int64 -&gt; PairS Word64 Int64
forall a b. a -&gt; b -&gt; PairS a b
</span><a href="Data.Text.Internal.Fusion.Types.html#%3A%2A%3A"><span class="hs-operator hs-var">:*:</span></a></span><span> </span><span class="annot"><span class="annottext">Int64
</span><a href="#local-6989586621679111798"><span class="hs-identifier hs-var">skp</span></a></span><span>
</span><span id="line-86"></span><span>                             </span><span class="annot"><a href="Data.Text.Internal.Lazy.html#Chunk"><span class="hs-identifier hs-type">Chunk</span></a></span><span> </span><span id="local-6989586621679111796"><span class="annot"><span class="annottext">Text
</span><a href="#local-6989586621679111796"><span class="hs-identifier hs-var">y</span></a></span></span><span> </span><span id="local-6989586621679111795"><span class="annot"><span class="annottext">Text
</span><a href="#local-6989586621679111795"><span class="hs-identifier hs-var">ys</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Text
-&gt; Text -&gt; Int64 -&gt; Int -&gt; Word64 -&gt; Int64 -&gt; PairS Word64 Int64
</span><a href="#local-6989586621679111816"><span class="hs-identifier hs-var">buildTable</span></a></span><span> </span><span class="annot"><span class="annottext">Text
</span><a href="#local-6989586621679111796"><span class="hs-identifier hs-var">y</span></a></span><span> </span><span class="annot"><span class="annottext">Text
</span><a href="#local-6989586621679111795"><span class="hs-identifier hs-var">ys</span></a></span><span> </span><span class="annot"><span class="annottext">Int64
</span><a href="#local-6989586621679111801"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">Word64
</span><a href="#local-6989586621679111794"><span class="hs-identifier hs-var">msk'</span></a></span><span> </span><span class="annot"><span class="annottext">Int64
</span><a href="#local-6989586621679111793"><span class="hs-identifier hs-var">skp'</span></a></span><span>
</span><span id="line-87"></span><span>            </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int64 -&gt; Int -&gt; Word64 -&gt; Int64 -&gt; PairS Word64 Int64
</span><a href="#local-6989586621679111809"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int64
</span><a href="#local-6989586621679111801"><span class="hs-identifier hs-var">g</span></a></span><span class="annot"><span class="annottext">Int64 -&gt; Int64 -&gt; Int64
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int64
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679111800"><span class="hs-identifier hs-var">i</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word64
</span><a href="#local-6989586621679111794"><span class="hs-identifier hs-var">msk'</span></a></span><span> </span><span class="annot"><span class="annottext">Int64
</span><a href="#local-6989586621679111793"><span class="hs-identifier hs-var">skp'</span></a></span><span>
</span><span id="line-88"></span><span>            </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621679111791"><span class="annot"><span class="annottext">c :: Word16
</span><a href="#local-6989586621679111791"><span class="hs-identifier hs-var hs-var">c</span></a></span></span><span>                </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Array -&gt; Int -&gt; Word16
</span><a href="Data.Text.Array.html#unsafeIndex"><span class="hs-identifier hs-var">A.unsafeIndex</span></a></span><span> </span><span class="annot"><span class="annottext">Array
</span><a href="#local-6989586621679111813"><span class="hs-identifier hs-var">xarr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679111812"><span class="hs-identifier hs-var">xoff</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679111800"><span class="hs-identifier hs-var">i</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-89"></span><span>                  </span><span id="local-6989586621679111794"><span class="annot"><span class="annottext">msk' :: Word64
</span><a href="#local-6989586621679111794"><span class="hs-identifier hs-var hs-var">msk'</span></a></span></span><span>             </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word64
</span><a href="#local-6989586621679111799"><span class="hs-identifier hs-var">msk</span></a></span><span> </span><span class="annot"><span class="annottext">Word64 -&gt; Word64 -&gt; Word64
forall a. Bits a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/Data.Bits.html#.%7C."><span class="hs-operator hs-var">.|.</span></a></span><span> </span><span class="annot"><span class="annottext">Word16 -&gt; Word64
</span><a href="#local-6989586621679111842"><span class="hs-identifier hs-var">swizzle</span></a></span><span> </span><span class="annot"><span class="annottext">Word16
</span><a href="#local-6989586621679111791"><span class="hs-identifier hs-var">c</span></a></span><span>
</span><span id="line-90"></span><span>                  </span><span id="local-6989586621679111793"><span class="annot"><span class="annottext">skp' :: Int64
</span><a href="#local-6989586621679111793"><span class="hs-identifier hs-var hs-var">skp'</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Word16
</span><a href="#local-6989586621679111791"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Word16 -&gt; Word16 -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">Word16
</span><a href="#local-6989586621679111865"><span class="hs-identifier hs-var">z</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int64
</span><a href="#local-6989586621679111894"><span class="hs-identifier hs-var">nlen</span></a></span><span> </span><span class="annot"><span class="annottext">Int64 -&gt; Int64 -&gt; Int64
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Int64
</span><a href="#local-6989586621679111801"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="annot"><span class="annottext">Int64 -&gt; Int64 -&gt; Int64
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Int64
</span><span class="hs-number">2</span></span><span>
</span><span id="line-91"></span><span>                       </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int64
</span><a href="#local-6989586621679111798"><span class="hs-identifier hs-var">skp</span></a></span><span>
</span><span id="line-92"></span><span>                  </span><span id="local-6989586621679111797"><span class="annot"><span class="annottext">xlast :: Int
</span><a href="#local-6989586621679111797"><span class="hs-identifier hs-var hs-var">xlast</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679111811"><span class="hs-identifier hs-var">xlen</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span>
</span><span id="line-93"></span><span>
</span><span id="line-94"></span><span>    </span><span class="hs-comment">-- | Check whether an attempt to index into the haystack at the</span><span>
</span><span id="line-95"></span><span>    </span><span class="hs-comment">-- given offset would fail.</span><span>
</span><span id="line-96"></span><span>    </span><span class="annot"><a href="#local-6989586621679111868"><span class="hs-identifier hs-type">lackingHay</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Int.html#Int64"><span class="hs-identifier hs-type">Int64</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.html#Text"><span class="hs-identifier hs-type">T.Text</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Lazy.html#Text"><span class="hs-identifier hs-type">Text</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span>
</span><span id="line-97"></span><span>    </span><span id="local-6989586621679111868"><span class="annot"><span class="annottext">lackingHay :: Int64 -&gt; Text -&gt; Text -&gt; Bool
</span><a href="#local-6989586621679111868"><span class="hs-identifier hs-var hs-var">lackingHay</span></a></span></span><span> </span><span id="local-6989586621679111783"><span class="annot"><span class="annottext">Int64
</span><a href="#local-6989586621679111783"><span class="hs-identifier hs-var">q</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int64 -&gt; Text -&gt; Text -&gt; Bool
</span><a href="#local-6989586621679111782"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">Int64
</span><span class="hs-number">0</span></span><span>
</span><span id="line-98"></span><span>      </span><span class="hs-keyword">where</span><span>
</span><span id="line-99"></span><span>        </span><span id="local-6989586621679111782"><span class="annot"><span class="annottext">go :: Int64 -&gt; Text -&gt; Text -&gt; Bool
</span><a href="#local-6989586621679111782"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span id="local-6989586621679111780"><span class="annot"><span class="annottext">Int64
</span><a href="#local-6989586621679111780"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.html#Text"><span class="hs-identifier hs-type">T.Text</span></a></span><span> </span><span class="annot"><span class="annottext">Array
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679111779"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679111779"><span class="hs-identifier hs-var">l</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679111778"><span class="annot"><span class="annottext">Text
</span><a href="#local-6989586621679111778"><span class="hs-identifier hs-var">ps</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int64
</span><a href="#local-6989586621679111777"><span class="hs-identifier hs-var">p'</span></a></span><span> </span><span class="annot"><span class="annottext">Int64 -&gt; Int64 -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C"><span class="hs-operator hs-var">&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">Int64
</span><a href="#local-6989586621679111783"><span class="hs-identifier hs-var">q</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%26%26"><span class="hs-operator hs-var">&amp;&amp;</span></a></span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Text
</span><a href="#local-6989586621679111778"><span class="hs-identifier hs-var">ps</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-100"></span><span>                                             </span><span class="annot"><span class="annottext">Text
</span><a href="Data.Text.Internal.Lazy.html#Empty"><span class="hs-identifier hs-var">Empty</span></a></span><span>      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>
</span><span id="line-101"></span><span>                                             </span><span class="annot"><a href="Data.Text.Internal.Lazy.html#Chunk"><span class="hs-identifier hs-type">Chunk</span></a></span><span> </span><span id="local-6989586621679111775"><span class="annot"><span class="annottext">Text
</span><a href="#local-6989586621679111775"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span id="local-6989586621679111774"><span class="annot"><span class="annottext">Text
</span><a href="#local-6989586621679111774"><span class="hs-identifier hs-var">rs</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int64 -&gt; Text -&gt; Text -&gt; Bool
</span><a href="#local-6989586621679111782"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">Int64
</span><a href="#local-6989586621679111777"><span class="hs-identifier hs-var">p'</span></a></span><span> </span><span class="annot"><span class="annottext">Text
</span><a href="#local-6989586621679111775"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="annot"><span class="annottext">Text
</span><a href="#local-6989586621679111774"><span class="hs-identifier hs-var">rs</span></a></span><span>
</span><span id="line-102"></span><span>            </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621679111777"><span class="annot"><span class="annottext">p' :: Int64
</span><a href="#local-6989586621679111777"><span class="hs-identifier hs-var hs-var">p'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int64
</span><a href="#local-6989586621679111780"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">Int64 -&gt; Int64 -&gt; Int64
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int64
</span><a href="Data.Text.Internal.Lazy.Search.html#intToInt64"><span class="hs-identifier hs-var">intToInt64</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679111779"><span class="hs-identifier hs-var">l</span></a></span><span>
</span><span id="line-103"></span><span class="annot"><a href="Data.Text.Internal.Lazy.Search.html#indices"><span class="hs-identifier hs-var">indices</span></a></span><span> </span><span class="annot"><span class="annottext">Text
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Text
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-104"></span><span>
</span><span id="line-105"></span><span class="hs-comment">-- | Fast index into a partly unpacked 'Text'.  We take into account</span><span>
</span><span id="line-106"></span><span class="hs-comment">-- the possibility that the caller might try to access one element</span><span>
</span><span id="line-107"></span><span class="hs-comment">-- past the end.</span><span>
</span><span id="line-108"></span><span class="annot"><a href="Data.Text.Internal.Lazy.Search.html#index"><span class="hs-identifier hs-type">index</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.Text.Internal.html#Text"><span class="hs-identifier hs-type">T.Text</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Lazy.html#Text"><span class="hs-identifier hs-type">Text</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Int.html#Int64"><span class="hs-identifier hs-type">Int64</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word16"><span class="hs-identifier hs-type">Word16</span></a></span><span>
</span><span id="line-109"></span><span id="index"><span class="annot"><span class="annottext">index :: Text -&gt; Text -&gt; Int64 -&gt; Word16
</span><a href="Data.Text.Internal.Lazy.Search.html#index"><span class="hs-identifier hs-var hs-var">index</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.html#Text"><span class="hs-identifier hs-type">T.Text</span></a></span><span> </span><span id="local-6989586621679111772"><span class="annot"><span class="annottext">Array
</span><a href="#local-6989586621679111772"><span class="hs-identifier hs-var">arr</span></a></span></span><span> </span><span id="local-6989586621679111771"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679111771"><span class="hs-identifier hs-var">off</span></a></span></span><span> </span><span id="local-6989586621679111770"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679111770"><span class="hs-identifier hs-var">len</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679111769"><span class="annot"><span class="annottext">Text
</span><a href="#local-6989586621679111769"><span class="hs-identifier hs-var">xs</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679111768"><span class="annot"><span class="annottext">Int64
</span><a href="#local-6989586621679111768"><span class="hs-identifier hs-var">i</span></a></span></span><span>
</span><span id="line-110"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679111767"><span class="hs-identifier hs-var">j</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C"><span class="hs-operator hs-var">&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679111770"><span class="hs-identifier hs-var">len</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Array -&gt; Int -&gt; Word16
</span><a href="Data.Text.Array.html#unsafeIndex"><span class="hs-identifier hs-var">A.unsafeIndex</span></a></span><span> </span><span class="annot"><span class="annottext">Array
</span><a href="#local-6989586621679111772"><span class="hs-identifier hs-var">arr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679111771"><span class="hs-identifier hs-var">off</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679111767"><span class="hs-identifier hs-var">j</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-111"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Text
</span><a href="#local-6989586621679111769"><span class="hs-identifier hs-var">xs</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-112"></span><span>                    </span><span class="annot"><span class="annottext">Text
</span><a href="Data.Text.Internal.Lazy.html#Empty"><span class="hs-identifier hs-var">Empty</span></a></span><span>
</span><span id="line-113"></span><span>                        </span><span class="hs-comment">-- out of bounds, but legal</span><span>
</span><span id="line-114"></span><span>                        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679111767"><span class="hs-identifier hs-var">j</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679111770"><span class="hs-identifier hs-var">len</span></a></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Word16
</span><span class="hs-number">0</span></span><span>
</span><span id="line-115"></span><span>                        </span><span class="hs-comment">-- should never happen, due to lackingHay above</span><span>
</span><span id="line-116"></span><span>                        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; Word16
forall a. String -&gt; a
</span><a href="Data.Text.Internal.Lazy.Search.html#emptyError"><span class="hs-identifier hs-var">emptyError</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;index&quot;</span></span><span>
</span><span id="line-117"></span><span>                    </span><span class="annot"><a href="Data.Text.Internal.Lazy.html#Chunk"><span class="hs-identifier hs-type">Chunk</span></a></span><span> </span><span id="local-6989586621679111765"><span class="annot"><span class="annottext">Text
</span><a href="#local-6989586621679111765"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span id="local-6989586621679111764"><span class="annot"><span class="annottext">Text
</span><a href="#local-6989586621679111764"><span class="hs-identifier hs-var">cs</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Text -&gt; Text -&gt; Int64 -&gt; Word16
</span><a href="Data.Text.Internal.Lazy.Search.html#index"><span class="hs-identifier hs-var">index</span></a></span><span> </span><span class="annot"><span class="annottext">Text
</span><a href="#local-6989586621679111765"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Text
</span><a href="#local-6989586621679111764"><span class="hs-identifier hs-var">cs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int64
</span><a href="#local-6989586621679111768"><span class="hs-identifier hs-var">i</span></a></span><span class="annot"><span class="annottext">Int64 -&gt; Int64 -&gt; Int64
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int64
</span><a href="Data.Text.Internal.Lazy.Search.html#intToInt64"><span class="hs-identifier hs-var">intToInt64</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679111770"><span class="hs-identifier hs-var">len</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-118"></span><span>    </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621679111767"><span class="annot"><span class="annottext">j :: Int
</span><a href="#local-6989586621679111767"><span class="hs-identifier hs-var hs-var">j</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int64 -&gt; Int
</span><a href="Data.Text.Internal.Lazy.Search.html#int64ToInt"><span class="hs-identifier hs-var">int64ToInt</span></a></span><span> </span><span class="annot"><span class="annottext">Int64
</span><a href="#local-6989586621679111768"><span class="hs-identifier hs-var">i</span></a></span><span>
</span><span id="line-119"></span><span>
</span><span id="line-120"></span><span class="hs-comment">-- | A variant of 'indices' that scans linearly for a single 'Word16'.</span><span>
</span><span id="line-121"></span><span class="annot"><a href="Data.Text.Internal.Lazy.Search.html#indicesOne"><span class="hs-identifier hs-type">indicesOne</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word16"><span class="hs-identifier hs-type">Word16</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Int.html#Int64"><span class="hs-identifier hs-type">Int64</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.html#Text"><span class="hs-identifier hs-type">T.Text</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Lazy.html#Text"><span class="hs-identifier hs-type">Text</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Int.html#Int64"><span class="hs-identifier hs-type">Int64</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-122"></span><span id="indicesOne"><span class="annot"><span class="annottext">indicesOne :: Word16 -&gt; Int64 -&gt; Text -&gt; Text -&gt; [Int64]
</span><a href="Data.Text.Internal.Lazy.Search.html#indicesOne"><span class="hs-identifier hs-var hs-var">indicesOne</span></a></span></span><span> </span><span id="local-6989586621679111762"><span class="annot"><span class="annottext">Word16
</span><a href="#local-6989586621679111762"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int64 -&gt; Text -&gt; Text -&gt; [Int64]
</span><a href="#local-6989586621679111761"><span class="hs-identifier hs-var">chunk</span></a></span><span>
</span><span id="line-123"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-124"></span><span>    </span><span class="annot"><a href="#local-6989586621679111761"><span class="hs-identifier hs-type">chunk</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Int.html#Int64"><span class="hs-identifier hs-type">Int64</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.html#Text"><span class="hs-identifier hs-type">T.Text</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Lazy.html#Text"><span class="hs-identifier hs-type">Text</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Int.html#Int64"><span class="hs-identifier hs-type">Int64</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-125"></span><span>    </span><span id="local-6989586621679111761"><span class="annot"><span class="annottext">chunk :: Int64 -&gt; Text -&gt; Text -&gt; [Int64]
</span><a href="#local-6989586621679111761"><span class="hs-identifier hs-var hs-var">chunk</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679111760"><span class="annot"><span class="annottext">Int64
</span><a href="#local-6989586621679111760"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.html#Text"><span class="hs-identifier hs-type">T.Text</span></a></span><span> </span><span id="local-6989586621679111759"><span class="annot"><span class="annottext">Array
</span><a href="#local-6989586621679111759"><span class="hs-identifier hs-var">oarr</span></a></span></span><span> </span><span id="local-6989586621679111758"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679111758"><span class="hs-identifier hs-var">ooff</span></a></span></span><span> </span><span id="local-6989586621679111757"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679111757"><span class="hs-identifier hs-var">olen</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679111756"><span class="annot"><span class="annottext">Text
</span><a href="#local-6989586621679111756"><span class="hs-identifier hs-var">os</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; [Int64]
</span><a href="#local-6989586621679111755"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span>
</span><span id="line-126"></span><span>      </span><span class="hs-keyword">where</span><span>
</span><span id="line-127"></span><span>        </span><span id="local-6989586621679111755"><span class="annot"><span class="annottext">go :: Int -&gt; [Int64]
</span><a href="#local-6989586621679111755"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span id="local-6989586621679111746"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679111746"><span class="hs-identifier hs-var">h</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679111746"><span class="hs-identifier hs-var">h</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3E%3D"><span class="hs-operator hs-var">&gt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679111757"><span class="hs-identifier hs-var">olen</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Text
</span><a href="#local-6989586621679111756"><span class="hs-identifier hs-var">os</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-128"></span><span>                             </span><span class="annot"><span class="annottext">Text
</span><a href="Data.Text.Internal.Lazy.html#Empty"><span class="hs-identifier hs-var">Empty</span></a></span><span>      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-129"></span><span>                             </span><span class="annot"><a href="Data.Text.Internal.Lazy.html#Chunk"><span class="hs-identifier hs-type">Chunk</span></a></span><span> </span><span id="local-6989586621679111745"><span class="annot"><span class="annottext">Text
</span><a href="#local-6989586621679111745"><span class="hs-identifier hs-var">y</span></a></span></span><span> </span><span id="local-6989586621679111744"><span class="annot"><span class="annottext">Text
</span><a href="#local-6989586621679111744"><span class="hs-identifier hs-var">ys</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int64 -&gt; Text -&gt; Text -&gt; [Int64]
</span><a href="#local-6989586621679111761"><span class="hs-identifier hs-var">chunk</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int64
</span><a href="#local-6989586621679111760"><span class="hs-identifier hs-var">i</span></a></span><span class="annot"><span class="annottext">Int64 -&gt; Int64 -&gt; Int64
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int64
</span><a href="Data.Text.Internal.Lazy.Search.html#intToInt64"><span class="hs-identifier hs-var">intToInt64</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679111757"><span class="hs-identifier hs-var">olen</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Text
</span><a href="#local-6989586621679111745"><span class="hs-identifier hs-var">y</span></a></span><span> </span><span class="annot"><span class="annottext">Text
</span><a href="#local-6989586621679111744"><span class="hs-identifier hs-var">ys</span></a></span><span>
</span><span id="line-130"></span><span>             </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Word16
</span><a href="#local-6989586621679111743"><span class="hs-identifier hs-var">on</span></a></span><span> </span><span class="annot"><span class="annottext">Word16 -&gt; Word16 -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">Word16
</span><a href="#local-6989586621679111762"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int64
</span><a href="#local-6989586621679111760"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Int64 -&gt; Int64 -&gt; Int64
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int64
</span><a href="Data.Text.Internal.Lazy.Search.html#intToInt64"><span class="hs-identifier hs-var">intToInt64</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679111746"><span class="hs-identifier hs-var">h</span></a></span><span> </span><span class="annot"><span class="annottext">Int64 -&gt; [Int64] -&gt; [Int64]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; [Int64]
</span><a href="#local-6989586621679111755"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679111746"><span class="hs-identifier hs-var">h</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span>
</span><span id="line-131"></span><span>             </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; [Int64]
</span><a href="#local-6989586621679111755"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679111746"><span class="hs-identifier hs-var">h</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span>
</span><span id="line-132"></span><span>             </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621679111743"><span class="annot"><span class="annottext">on :: Word16
</span><a href="#local-6989586621679111743"><span class="hs-identifier hs-var hs-var">on</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Array -&gt; Int -&gt; Word16
</span><a href="Data.Text.Array.html#unsafeIndex"><span class="hs-identifier hs-var">A.unsafeIndex</span></a></span><span> </span><span class="annot"><span class="annottext">Array
</span><a href="#local-6989586621679111759"><span class="hs-identifier hs-var">oarr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679111758"><span class="hs-identifier hs-var">ooff</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679111746"><span class="hs-identifier hs-var">h</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-133"></span><span>
</span><span id="line-134"></span><span class="hs-comment">-- | The number of 'Word16' values in a 'Text'.</span><span>
</span><span id="line-135"></span><span class="annot"><a href="Data.Text.Internal.Lazy.Search.html#wordLength"><span class="hs-identifier hs-type">wordLength</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.Text.Internal.Lazy.html#Text"><span class="hs-identifier hs-type">Text</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Int.html#Int64"><span class="hs-identifier hs-type">Int64</span></a></span><span>
</span><span id="line-136"></span><span id="wordLength"><span class="annot"><span class="annottext">wordLength :: Text -&gt; Int64
</span><a href="Data.Text.Internal.Lazy.Search.html#wordLength"><span class="hs-identifier hs-var hs-var">wordLength</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Int64 -&gt; Text -&gt; Int64) -&gt; Int64 -&gt; Text -&gt; Int64
forall a. (a -&gt; Text -&gt; a) -&gt; a -&gt; Text -&gt; a
</span><a href="Data.Text.Internal.Lazy.html#foldlChunks"><span class="hs-identifier hs-var">foldlChunks</span></a></span><span> </span><span class="annot"><span class="annottext">Int64 -&gt; Text -&gt; Int64
</span><a href="#local-6989586621679111741"><span class="hs-identifier hs-var">sumLength</span></a></span><span> </span><span class="annot"><span class="annottext">Int64
</span><span class="hs-number">0</span></span><span>
</span><span id="line-137"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-138"></span><span>    </span><span class="annot"><a href="#local-6989586621679111741"><span class="hs-identifier hs-type">sumLength</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Int.html#Int64"><span class="hs-identifier hs-type">Int64</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.html#Text"><span class="hs-identifier hs-type">T.Text</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Int.html#Int64"><span class="hs-identifier hs-type">Int64</span></a></span><span>
</span><span id="line-139"></span><span>    </span><span id="local-6989586621679111741"><span class="annot"><span class="annottext">sumLength :: Int64 -&gt; Text -&gt; Int64
</span><a href="#local-6989586621679111741"><span class="hs-identifier hs-var hs-var">sumLength</span></a></span></span><span> </span><span id="local-6989586621679111740"><span class="annot"><span class="annottext">Int64
</span><a href="#local-6989586621679111740"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.html#Text"><span class="hs-identifier hs-type">T.Text</span></a></span><span> </span><span class="annot"><span class="annottext">Array
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679111739"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679111739"><span class="hs-identifier hs-var">l</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int64
</span><a href="#local-6989586621679111740"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Int64 -&gt; Int64 -&gt; Int64
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int64
</span><a href="Data.Text.Internal.Lazy.Search.html#intToInt64"><span class="hs-identifier hs-var">intToInt64</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679111739"><span class="hs-identifier hs-var">l</span></a></span><span>
</span><span id="line-140"></span><span>
</span><span id="line-141"></span><span id="local-6989586621679111953"><span class="annot"><a href="Data.Text.Internal.Lazy.Search.html#emptyError"><span class="hs-identifier hs-type">emptyError</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679111953"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-142"></span><span id="emptyError"><span class="annot"><span class="annottext">emptyError :: forall a. String -&gt; a
</span><a href="Data.Text.Internal.Lazy.Search.html#emptyError"><span class="hs-identifier hs-var hs-var">emptyError</span></a></span></span><span> </span><span id="local-6989586621679111736"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679111736"><span class="hs-identifier hs-var">fun</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; a
forall a. HasCallStack =&gt; String -&gt; a
</span><a href="../../base/src/GHC.Err.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Data.Text.Lazy.Search.&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679111736"><span class="hs-identifier hs-var">fun</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;: empty input&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-143"></span><span>
</span><span id="line-144"></span><span class="annot"><a href="Data.Text.Internal.Lazy.Search.html#intToInt64"><span class="hs-identifier hs-type">intToInt64</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Int.html#Int64"><span class="hs-identifier hs-type">Int64</span></a></span><span>
</span><span id="line-145"></span><span id="intToInt64"><span class="annot"><span class="annottext">intToInt64 :: Int -&gt; Int64
</span><a href="Data.Text.Internal.Lazy.Search.html#intToInt64"><span class="hs-identifier hs-var hs-var">intToInt64</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int64
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span>
</span><span id="line-146"></span><span>
</span><span id="line-147"></span><span class="annot"><a href="Data.Text.Internal.Lazy.Search.html#int64ToInt"><span class="hs-identifier hs-type">int64ToInt</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Int.html#Int64"><span class="hs-identifier hs-type">Int64</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span>
</span><span id="line-148"></span><span id="int64ToInt"><span class="annot"><span class="annottext">int64ToInt :: Int64 -&gt; Int
</span><a href="Data.Text.Internal.Lazy.Search.html#int64ToInt"><span class="hs-identifier hs-var hs-var">int64ToInt</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int64 -&gt; Int
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span>
</span><span id="line-149"></span><span>
</span><span id="line-150"></span><span class="annot"><a href="Data.Text.Internal.Lazy.Search.html#word16ToInt"><span class="hs-identifier hs-type">word16ToInt</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word16"><span class="hs-identifier hs-type">Word16</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span>
</span><span id="line-151"></span><span id="word16ToInt"><span class="annot"><span class="annottext">word16ToInt :: Word16 -&gt; Int
</span><a href="Data.Text.Internal.Lazy.Search.html#word16ToInt"><span class="hs-identifier hs-var hs-var">word16ToInt</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word16 -&gt; Int
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span>
</span><span id="line-152"></span></pre></body></html>